/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 */

/**
 * 池配置
 *
 * @since 2022/8/12
 */
export type PoolConfig = {
  maxPoolNum?: number;
  minPoolNum?: number;
  recycleInterval?: number;
  maxIdleTime?: number;
  maxCoreSize?: number;
  cacheCapacity?: number;
  cacheTtl?: number;
};

export function isSamePoolConfig(p1: PoolConfig, p2: PoolConfig) {
  return (
    p1.maxPoolNum === p2.maxPoolNum &&
    p1.minPoolNum === p2.minPoolNum &&
    p1.recycleInterval === p2.recycleInterval &&
    p1.maxIdleTime === p2.maxIdleTime &&
    p1.maxCoreSize === p2.maxCoreSize &&
    p1.cacheCapacity === p2.cacheCapacity &&
    p1.cacheTtl === p2.cacheTtl
  );
}
